import { ref } from 'vue'
import { defineStore } from 'pinia'

export const useSqliteStore = defineStore('Sqlite', () => {
  //班级
  const classList = ref([])
  const userList = ref()
  const imageList = ref()
  //class 包含class 总人数 男 女
  const getClassList = () => {
    return classList.value
  }
  const setClassList = (val) => {
    classList.value = val
  }
  const emptyClassList = () => {
    classList.value.length = 0
  }
  //user
  const getUserList = () => {
    return userList.value
  }
  const setUserList = (val) => {
    userList.value = val
  }
  const emptyUserList = () => {
    userList.value.length = 0
  }
  //image
  const getImageList = () => {
    return userList.value
  }
  const setImageList = (val) => {
    userList.value = val
  }
  const emptyImageList = () => {
    imageList.value.length = 0
  }

  return {
    getClassList,
    setClassList,
    emptyClassList,
    getUserList,
    setUserList,
    emptyUserList,
    getImageList,
    setImageList,
    emptyImageList
  }
})
